Skip to content

Hyunje#2

Open
HyunjeLee wants to merge 8 commits intoLikeLion-Study:masterfrom
HyunjeLee:hyunje
Open

Hyunje#2
HyunjeLee wants to merge 8 commits intoLikeLion-Study:masterfrom
HyunjeLee:hyunje

Conversation

@HyunjeLee
Copy link
Copy Markdown

예외처리는 메서드마다 try-catch로 묶어야될 지 (번거로운데..?)

전체 고객 정보는 ArrayList로 놔둬도 괜찮을 지

Manager 클래스는 Model에 묶이는 게 맞는 지

getCustomer()는 private 처리로 하는 게 맞는 지

리팩토링을 하다보니 여러 고민이 듭니다 🤔🪑

HyunjeLee added 8 commits May 10, 2025 09:29
기존 CustomerLegacy -> Customer.java 생성 및 파일 분리
생성자를 통한 초기화
필드 캡슐화
`id` 필드 `final` 처리
Customer.status -> CustomerStatus 로 파일분리
기존 CustomerService 내의 CRUD 작업을 외부 클래스로 분리
클래스명 명확성을 위해 MVC 패턴에 맞춰 클래스명 변경
- Manager 클래스 내 `readCustomers()` 메서드를 View 클래스로 이동 `showAllCustomers()`
- Manager 클래스 내 `customers` 필드 캡슐화
- Manager 클래스 내 `getCustomer()` 메서드 추가
- `Customer`업데이트 관련 출력 시 이전 이름 출력을 위해 로직 수정
- Manager 클래스 내 출력 관련 코드를 View 클래스로 분리
- 기존 로직을 위해 `getOldName()` 메서드 추가
- 잘못된 `id` 입력 시 예외 발생
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant